The delivery of media over networks such as the Internet can be accomplished in many ways, including progressive downloading or streaming. Progressive downloading involves downloading a media file from the network to a device running software client. Unlike many other types of downloading, however, progressive downloading enables the device to initiate playback of the media before the media file is completely downloaded.
Progressive downloading, however, has various limitations. For example, inserting advertisements into a media file for progressive downloading often requires transcoding, which can take a large amount of time and processing power. Additionally, if several different advertisements are to be used, or if the advertisements change, a large amount of preprocessing is required to create and store various different permutations of a media file so that the proper permutation is ready to be downloaded once requested. This can consume vast amounts of processing power and storage space. Furthermore, it restricts the customization of advertisements to a particular end user by requiring that the downloaded file is selected from a finite set of preprocessed permutations.